﻿/**
* @todo：用户修改密码
* @date：2008-2-26
* @author：yuli
*/
function changeacluserpassword(){
	if(document.getElementById("oldpwd").value == ""){
		alert("请输入原密码!");
		document.getElementById("oldpwd").focus();
		return;			
	}else if(document.getElementById("newpwd").value == ""){
		alert("请输入新密码!");
		document.getElementById("newpwd").focus();
		return;	
	}else if(document.getElementById("newpwd").value!=document.getElementById("cfmpwd").value){
		alert("两次输入的密码不一致!");
		document.getElementById("cfmpwd").focus();
		return;	
	}
			
	var oldpwd = dwr.util.getValue("oldpwd");
	var newpwd = dwr.util.getValue("newpwd");
  	ConfigAction.changeAcluserPassword(oldpwd,newpwd, function(data) {
    		if(data!=null){
    			alert(data);
    		}else{
    			alert("修改密码成功!");
    		}
    		document.getElementById("oldpwd").value="";
  			document.getElementById("newpwd").value="";
  			document.getElementById("cfmpwd").value="";
  	})
}